<template>
  <div class="container">
    <div class="header__box">
      <div class="header">
        <div class="header__logo">
          <img src="@/assets/img/logo.png" alt="">
          <p>自动对轨系统</p>
        <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" background-color="#0096ff"  text-color="white" active-text-color="white" @select="handleSelect" router>
          <el-menu-item index="/userManage">用户管理</el-menu-item>
          <el-menu-item index="/pictureList">画本列表</el-menu-item>
          <el-menu-item index="/hearList">审听列表</el-menu-item>
          <el-menu-item index="/musicDown">音频下载列表</el-menu-item>
          <el-menu-item index="/narrationTask">旁白任务列表</el-menu-item>
          <el-menu-item index="/cvList">cv音频任务列表</el-menu-item>
          <el-menu-item index="/bookUp" class="mask">上传新书</el-menu-item>
          <el-menu-item index="/message">消息栏</el-menu-item>
          <el-submenu >
            <template slot="title" >{{ username }}</template>
            <el-menu-item index="/changePsd" >修改密码</el-menu-item>
            <el-menu-item index="/login">退出登录</el-menu-item>
          </el-submenu>
          <el-menu-item ><a target="_blank" href="/Admin_V1.0.1.pdf"><i class="el-icon-info" style="color: #f7faff;line-height:50px"></i>教程</a></el-menu-item>
        </el-menu>
      </div>
    </div>
    <div class="center">
      <div class="content">
        <button class="back" @click="goBack()">返回到<br>上一页</button>
        <router-view></router-view>
      </div>
    </div>
  </div>
</div>
</template>

<script>

export default {
  data(){
    return{
      username:'admin0-木星工作室'
    }
  },
  methods:{
    goBack(){
      this.$router.go(-1);//返回上一层
    },
  }
};
</script>

<style scoped lang='scss'>
.container{
	height: 100%;
	width: 100%;
	overflow-x: hidden;
}
.header__box{
  background-color:#0096ff;
  .header{
    max-width: 1600px;
    margin: 0 auto;
    min-height: 51px;
    display: flex;
    flex-wrap: wrap;
    .header__logo{
      margin-left: 20px;
      display: flex;
      justify-content: center;
      align-items: center;
      margin-right: 10px;
      img{
        width: 140px;
        height: 20px;
        margin-right: 10px;
        cursor: pointer;
      }
      p{
        color: #f7faff;
        font-size: 21px;
        cursor: pointer;
        width: 154px;
      }
    }
    //.header__content{
    //  flex: 1;
    //  height: 51px;
    //}
  }
}

.menu{
  .el-menu{
    height: 51px;
    display: flex;
    padding-left: 10px;
    flex-direction: row;
    justify-content: space-between;
    li{
      text-align: center;
    }
    .el-menu-item{
      height: 50px;
      line-height: 50px;
      padding: 0 16px;
    }
  }

  .el-submenu {
    height: 50px;
    line-height: 50px;
  }
  .mask{
    margin-right: 75px !important;
  }

.el-menu-item:focus {
	background-color: #2674c5 !important;
}


.content{
  padding: 40px 20px;
  width: 100%;
  height: 100%;
  .back{
    position: fixed;
    bottom: 25%;
    right: -50px;
    z-index: 6;
    color: #fff;
    background: #0096ff;
    padding: 17px 10px 10px;
    box-shadow: 0 0 6px #eee;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    text-align: center;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .back:hover {
    right: 0px;
    background: #fff;
    color: #0096ff;
  }

}
// 除去白线
.el-menu.el-menu--horizontal{
	border: none;
}

@media screen and (max-width: 1150px) {
  .menu .wrap{
    flex-wrap: wrap;
  }
}
</style>
